use supermarket;

ALTER TABLE table_supermarket ADD PARTITION (dt='20240623') LOCATION '/home/flume/ods/20240623/ods_supermarket_inc'; 

insert overwrite table dwd_shelves select item_name,shelf_status from table_supermarket;
insert overwrite table dwd_user_AND_product select user_id,item_name from table_supermarket;
insert overwrite table dwd_name select item_name from table_supermarket;
insert overwrite table dwd_UNLike select user_id,item_name,popularity_level from table_supermarket;
insert overwrite table dwd_namesales select item_name,sold_quantity from table_supermarket;

insert overwrite table dim_user select user_id from table_supermarket;
insert overwrite table dim_item select item_id,item_name,stock_quantity,popularity_level,sold_quantity from table_supermarket;


